<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
        使用promise--(resolve,reject)包裹的代码块不会马上执行,它会将代码块凝固(暂停)
         */
        console.log(1);
        let go = new Promise((resolve,reject)=>{
            resolve(1);
            reject(2);
        })
        console.log(3);
        go.then(res=>{
            console.log(res)
        })
    </script>
</body>
</html>